package com.central.scheduler.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.db.mapper.SuperMapper;
import com.central.scheduler.dao.model.AlertPluginInstance;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Tindy
 * @date 2021/11/5
 * @describe
 */
@Mapper
public interface AlertPluginInstanceMapper extends SuperMapper<AlertPluginInstance> {

    /**
     * query all alert plugin instance
     *
     * @return AlertPluginInstance list
     */
    List<AlertPluginInstance> queryAllAlertPluginInstanceList();

    /**
     * query by alert group id
     *
     * @param ids
     * @return AlertPluginInstance list
     */
    List<AlertPluginInstance> queryByIds(@Param("ids") List<Integer> ids);

    List<AlertPluginInstance> queryByInstanceName(@Param("instanceName")String instanceName);

    /**
     *
     * @param instanceName instanceName
     * @return if exist return true else return null
     */
    Boolean existInstanceName(@Param("instanceName") String instanceName);

}

